package com.surveillance.BO;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.surveillance.DAO.AffectedSurveillantsDao;
import com.surveillance.entities.AffectedSurveillants;

@Service("AffectedSurveillantsBo")
public class AffectedSurveillantsBo implements BOLayer<AffectedSurveillants> {
	@Autowired
	AffectedSurveillantsDao affectedSurveillantsDao;

	public void setAffectedSurveillantsDao(
			AffectedSurveillantsDao affectedSurveillantsDao) {
		this.affectedSurveillantsDao = affectedSurveillantsDao;
	}

	@Override
	public boolean save(AffectedSurveillants myEntity) {
		// TODO Auto-generated method stub
		affectedSurveillantsDao.save(myEntity);
		return true;
	}

	@Override
	public void update(AffectedSurveillants myEntity) {
		// TODO Auto-generated method stub
		affectedSurveillantsDao.update(myEntity);
	}

	@Override
	public void delete(AffectedSurveillants myEntity) {
		// TODO Auto-generated method stub
		affectedSurveillantsDao.delete(myEntity);
	}

	@Override
	public AffectedSurveillants findByID(Long myEntityID) {
		// TODO Auto-generated method stub
		return affectedSurveillantsDao.findByID(myEntityID);
	}

	@Override
	public List<AffectedSurveillants> findAll() {
		// TODO Auto-generated method stub
		return affectedSurveillantsDao.findAll();
	}

	public List getAffectedSurveillantsByExamenID(Long examenID) {
		return affectedSurveillantsDao
				.getAffectedSurveillantsByExamenID(examenID);
	}

}
